RAIS  3.2
C:/Projekte/RAIS/dataaccesslayertest/CommonClasses/ContextTest.cs
Go to the documentation of this file.
00001 using System;
00002 using System.Collections.Generic;
00003 using System.Text;
00004 using NUnit.Framework;
00005 using RAIS.Common.Localization;
00006 using RAIS.DataAccessLayer;
00007 
00008 namespace RAIS.DataAccessLayerTest.CommonClasses
00009 {
00010         [TestFixture]
00011         public class ContextTest
00012         {
00013                 private int expectedID = 1;
00014                 private string expectedName = "Test Context";
00015 
00016                 private Context culture;
00017 
00018                 [SetUp]
00019                 public void Init()
00020                 {
00021                         culture = new Context();
00022                         culture.ID = this.expectedID;
00023                         culture.Name = this.expectedName;
00024                 }
00025                 [Test]
00026                 public void GetID()
00027                 {
00028                         // Test 
00029                         Assert.AreEqual(this.expectedID, this.culture.ID);
00030                 }
00031                 [Test]
00032                 public void GetName()
00033                 {
00034                         // Test 
00035                         Assert.AreEqual(this.expectedName, this.culture.Name);
00036                 }
00037                 [Test]
00038                 public void SetName()
00039                 {
00040                         // Preparation
00041                         string expectedNewName = "New Test Context";
00042 
00043                         // Test 
00044                         this.culture.Name = expectedNewName;
00045 
00046                         // Check
00047                         Assert.AreEqual(expectedNewName, this.culture.Name);
00048                 }
00049         }
00050 }